package com.briup.ptp.pigTest;

import com.briup.ptp.entity.Pig;
import com.briup.ptp.mapper.PigMapper;
import com.briup.ptp.service.PigService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

/**
 * @author GaoB
 * @date 2024/2/23 20:18:57
 * @description
 */
@SpringBootTest
public class test {
    @Autowired
    PigMapper mapper;
    @Autowired
    PigService service;

    @Test
    public void test(){
        Pig pig = new Pig();
        pig.setGender("公").setHeight(200.2).setWeight(100.2).setSpecies("花猪").setHouseId(3).setVaccination("是").setId(17);
        service.saveOrUpdate(pig);
    }
}
